UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4gTvFGli3v5tLcg+qMbcHwvrpQbPkC1s/G/Ajj0uc64='
WHERE
key_id = '3e9a8bfe3f7400a0b0e012cb8bad741724a4d4f87aa0bffb8b4227d566a51a24'
AND (
token = '4gTvFGli3v5tLcg+qMbcHwvrpQbPkC1s/G/Ajj0uc64='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)