UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vpMTHM1qNDddHjhkwrAsxMF9W1dqvf0f161ujFyT4nM='
WHERE
key_id = '32586ee22eb0e8bccc318194020272809beeb5135482a9e1b39aaf0f25e718d6'
AND (
token = 'vpMTHM1qNDddHjhkwrAsxMF9W1dqvf0f161ujFyT4nM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)