UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zOE4Dj4x4gL3tMOv8RSDfYFk6l3ZHerl+sdQBIuKI+M='
WHERE
key_id = '1d34b26c41065f351ed090b2ca7ed7d48fbb138073810f88698e8dbae0e6c0c4'
AND (
token = 'zOE4Dj4x4gL3tMOv8RSDfYFk6l3ZHerl+sdQBIuKI+M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)