UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hLqgG//y0miUMrqoD2aQ++htajY3rx3Oj+lUUZ6ZiHg='
WHERE
key_id = 'ceb93c496e20755ae5044c2ec99648e92696f2a4a400bdd51e410ef752479e0c'
AND (
token = 'hLqgG//y0miUMrqoD2aQ++htajY3rx3Oj+lUUZ6ZiHg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)