UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yzzhlKPzcMhukrc1wDf/XdkX6De/7NBoKYl+YlG+2R0='
WHERE
key_id = '335b2e9985a9722df4ea9855b6df6e9a89bebe573bb372280cbb8856c522ea31'
AND (
token = 'yzzhlKPzcMhukrc1wDf/XdkX6De/7NBoKYl+YlG+2R0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)