UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nwgWFzVBBvT2pPIFmvUJUkykdpoaxkQIxAAvf9tJ+ek='
WHERE
key_id = '91cdf96ec9d840e7133459a42e26cfa2087761a406cf3ae1d923bd4d2565e76c'
AND (
token = 'nwgWFzVBBvT2pPIFmvUJUkykdpoaxkQIxAAvf9tJ+ek='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)