UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wFZh3NF55ke+KEBkOqrAONnilY5BjPT9MaxQu3nk9jI='
WHERE
key_id = '15a30b542bcb1d5e5d441935cd0f5c4331048c369bf9d35bf32d9214cd650a72'
AND (
token = 'wFZh3NF55ke+KEBkOqrAONnilY5BjPT9MaxQu3nk9jI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)