UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1bMFsw6uPHb+Y5QysANY0UbsNcW1pBqR7c6A+Cu16Lc='
WHERE
key_id = '10e253c37c74a591e5c87c4b39b283ccbf4f68784c3ee9c1b53eb8bfdc6b8c66'
AND (
token = '1bMFsw6uPHb+Y5QysANY0UbsNcW1pBqR7c6A+Cu16Lc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)