UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U2ChPYosH+bbJ+OO6SvjvEJw0/Dp0nByUwajYjR8YSE='
WHERE
key_id = 'e64bbbbeeccd0f40f94a6795e8b6f2d741e59bbe51cf56d2cdcf78b34819e3ab'
AND (
token = 'U2ChPYosH+bbJ+OO6SvjvEJw0/Dp0nByUwajYjR8YSE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)