UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EoSOBukKLUEdHzBFgktVAtr6qveDwRTVFn/J+iY61AY='
WHERE
key_id = 'dcd3ff01ca5eab035dff4eaf9c6b1e0785fed25628c1a7ab465a524f17b67080'
AND (
token = 'EoSOBukKLUEdHzBFgktVAtr6qveDwRTVFn/J+iY61AY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)