UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fpwXdApsFoa22Y52E65+2xabQXoicOLEOsGT1HwEejk='
WHERE
key_id = '28be39bcb8778221ae557a724605c8053d68d9ff640177de2c79af5efa040d9b'
AND (
token = 'fpwXdApsFoa22Y52E65+2xabQXoicOLEOsGT1HwEejk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)