UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FvLd12+hr3JOmDxiOZGP/M2n1YiY9nneSVRGLW58zkc='
WHERE
key_id = 'c3880c3342b8227401507938e92f46cfeba7c99c09a59d4ec8b4ab3afc84ecd6'
AND (
token = 'FvLd12+hr3JOmDxiOZGP/M2n1YiY9nneSVRGLW58zkc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)