UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'neDTNyTewwYhsK4AHMYQnz66rQ1U+nZSUFPlb0+GuiM='
WHERE
key_id = '3044d3cfeab98ad4b52dadd2c320fe3066ab891bcb2ee0c1b4d04279dbce35bc'
AND (
token = 'neDTNyTewwYhsK4AHMYQnz66rQ1U+nZSUFPlb0+GuiM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)