UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'raNY+rmCeQflhCDDdm7l6BpbFqQoHy41cYpszndcQno='
WHERE
key_id = '0c4b5e81f28aca68d2e8ece6015e3f011dcd9005f39136f6cc1a62e0a257a339'
AND (
token = 'raNY+rmCeQflhCDDdm7l6BpbFqQoHy41cYpszndcQno='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)