UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mrqxj2ww5ioYPMrYVCFswjaAvw3+ROwYRJaa1yug4ks='
WHERE
key_id = '43c330582435ffa1b9da2a67646f907467301a908edaf1354c47b2be9d1ac251'
AND (
token = 'Mrqxj2ww5ioYPMrYVCFswjaAvw3+ROwYRJaa1yug4ks='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)