UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Un3KKfR+frUw8TUBw9qz1tLlm2Axlfs60RtT3Hol/Oo='
WHERE
key_id = '9a1b81b1eda93afcd34ce48dd27499299ad6f65fd674f550f0e689f841849621'
AND (
token = 'Un3KKfR+frUw8TUBw9qz1tLlm2Axlfs60RtT3Hol/Oo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)