UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'j/3qOoKl/jFt2GplG/FBq8QP4Xn8DJ4nKVGufcwFEYg='
WHERE
key_id = 'e4b3489d386ee3cb15cdcb1313a93eed899d82366f3989783505bd7d764d3e7b'
AND (
token = 'j/3qOoKl/jFt2GplG/FBq8QP4Xn8DJ4nKVGufcwFEYg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)