UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vEbnJghX8CPAh7YhQuR3lnlVHDe2Lh1SJlAlzbLefCg='
WHERE
key_id = '1e75a78259e8bc808f9923ba19c3c8432bf5d735b2e20014974b73f01bae659f'
AND (
token = 'vEbnJghX8CPAh7YhQuR3lnlVHDe2Lh1SJlAlzbLefCg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)