UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iuLcVKRc3tH/scpT9PENR77ivODVhQgEjQLx5Qsr82c='
WHERE
key_id = '28184d17d78ac07a1ee583bfae1082109bdbaf3b15c4cc43607f69f81f1ced64'
AND (
token = 'iuLcVKRc3tH/scpT9PENR77ivODVhQgEjQLx5Qsr82c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)