UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5eYDW0LNcAyLdHQXlQGSXpmETHK6WMkyWuRvZDBrNFE='
WHERE
key_id = '943105a23c7f839f7e79b23698d7757c605c0f9082ba6cf8b6ffdab11ec0957f'
AND (
token = '5eYDW0LNcAyLdHQXlQGSXpmETHK6WMkyWuRvZDBrNFE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)