UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AlC4XZybFgYQJGg6WljL5e4oIwrO26/WfYFGkivEAx0='
WHERE
key_id = '53a1faf043795721d2089705f2e701878b60b99bae2eeafe386e6f45149f12d6'
AND (
token = 'AlC4XZybFgYQJGg6WljL5e4oIwrO26/WfYFGkivEAx0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)