UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+Sc0x1aZtrCr9OVFqVUv902twSjDrvH/Z153JjiCB14='
WHERE
key_id = '59dfce3c30ff529e1c56b7c29021acb7fc8db8ee4d1e937c3e4c259affe367bb'
AND (
token = '+Sc0x1aZtrCr9OVFqVUv902twSjDrvH/Z153JjiCB14='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)