UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aIHX8MfMellA8kftSNZMtkANPZcZKVtTPtVwBX7p/bI='
WHERE
key_id = '1cb083f5d32be688865624a1f025ee72ac0260cdc08c309b8224e0be96b2215c'
AND (
token = 'aIHX8MfMellA8kftSNZMtkANPZcZKVtTPtVwBX7p/bI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)