UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'by4n+u8hutiBcaczQb+K2Ti1nxlLXFk9wQhs7VG9/YI='
WHERE
key_id = '73acb67b7d00227c30a67168894663b16713e770b2e70e45d3a703bb2f7681f0'
AND (
token = 'by4n+u8hutiBcaczQb+K2Ti1nxlLXFk9wQhs7VG9/YI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)