UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oZPXqSWbv7gDto/e7Sonu0hnv+ufc3x2Nf9TsU7ojvg='
WHERE
key_id = '48c7f789681cd01ea880ce5a17dbde2311c598ed18e6bbe7cc90abcb77ba7dc3'
AND (
token = 'oZPXqSWbv7gDto/e7Sonu0hnv+ufc3x2Nf9TsU7ojvg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)