UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E/mjGbvHJXLBFflBjTJv6Wpbu+z2bxSnemC6CwVsxyM='
WHERE
key_id = '2b35a9e9152d3359b4d07a2bdc88ff37d8b22109d62ae2253326aba9bbadea57'
AND (
token = 'E/mjGbvHJXLBFflBjTJv6Wpbu+z2bxSnemC6CwVsxyM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)