UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oGnu8/8BOyPt67F4l5hOND0tAP/Lqmz5eiCsX0VUBlQ='
WHERE
key_id = 'aed076c66d37e81f7704f6a5f994040c2e424c12d2c8fecb519c625456c47b98'
AND (
token = 'oGnu8/8BOyPt67F4l5hOND0tAP/Lqmz5eiCsX0VUBlQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)