UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7FuRgqC1LAmGierbWHQtJeyu+l8V7vAJVw0fo6bjRmc='
WHERE
key_id = '011e50dbdbcb75f32661a8f279e7abcd5f12a1ef08397cfbda0779c93587468b'
AND (
token = '7FuRgqC1LAmGierbWHQtJeyu+l8V7vAJVw0fo6bjRmc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)