UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MUW4kEffMfa80j1D/TfoLPHw/A4XZff6x2sXAXRzdCY='
WHERE
key_id = '898a02a1658edef9d8dc55def52b4e85e23dd5b84bf5b8283aaab26b067e83be'
AND (
token = 'MUW4kEffMfa80j1D/TfoLPHw/A4XZff6x2sXAXRzdCY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)