UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ll9GrVPAuIUkNGLYQSFtBM0qGuJPYHK4NUmmYvdCFRo='
WHERE
key_id = '977f8fa3bd04ea5bc5475e11a192f3d85cc15544585c258b1f03c68551dc7df1'
AND (
token = 'Ll9GrVPAuIUkNGLYQSFtBM0qGuJPYHK4NUmmYvdCFRo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)