UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OFqfxFltNN/WVAuqGWBuCDSX+cx4OMkvVn7Cm4uK6YI='
WHERE
key_id = '1351cc52d2483e5230c529db826720e2893e518527668aaa929ee15c5b69600a'
AND (
token = 'OFqfxFltNN/WVAuqGWBuCDSX+cx4OMkvVn7Cm4uK6YI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)