UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '60+XEMOXW1/AHN6Argmf5GnkcF7sDCUsxcBJMVSLysk='
WHERE
key_id = '81dd3b454b847e189a4103bddbc6d3d8ea0636bcc8e22e64ed70791830f3716f'
AND (
token = '60+XEMOXW1/AHN6Argmf5GnkcF7sDCUsxcBJMVSLysk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)